'''
@author: zhangkai
@license: (C) Copyright 2017-2023
@contact: jeffcobile@gmail.com
@Software : PyCharm
@file: base.py
@time: 2020-08-03 11:22:32
@desc: 
'''
import torch

from jjzhk.config import ZKCFG


class DetectionDataset(torch.utils.data.Dataset):
    def __init__(self, cfg:ZKCFG, phase):
        self.cfg = cfg
        self.phase = phase
        self.config = cfg

        self.dataset = self.__init_dataset__()

    def __getitem__(self, index):
        pass

    def __len__(self):
        return self.dataset.__len__()

    def __init_dataset__(self):
        pass

    def evaluate_detections(self, boxes, output_dir, infos):
        pass

    def collater(self, batch):
        return torch.utils.data.dataloader.default_collate(batch)